Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.brownfield.bootstrap.agent.md

Displaying Rendered β€’ View raw β€’ Download

.github/agents/speckit.brownfield.bootstrap.agent.md e8ff76d05a77d77a8d25cbb546b05b37b80b761e (e8ff76d0) Text, 5.75 KB

description: Generate spec-kit configuration tailored to the existing codebase


<!-- Extension: brownfield -->
<!-- Config: .specify/extensions/brownfield/ -->
Bootstrap Spec-Kit

Generate a customized spec-kit configuration for an existing codebase. Uses the project profile from T383838/speckit.brownfield.scan (or performs a scan if none exists) to create a constitution, templates, and agent configuration that match the project's actual architecture, tech stack, and conventions.

User Input

T282828
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty). The user may specify preferences (e.g., "strict TDD", "minimal constitution"), a target directory for a monorepo module, or request specific template customizations.

Prerequisites

1. Verify the current directory is a git repository
2. Verify a spec-kit project exists by checking for T383838.specify/ directory (run T383838specify init first if missing)
3. Check if a project profile exists from a previous scan β€” if not, run a scan first

Outline

1. Load or generate project profile: Check if T383838/speckit.brownfield.scan has been run:
β€’ If a project profile exists, use it
β€’ If not, perform an inline scan to gather tech stack, architecture, and conventions
β€’ Confirm the profile with the user before proceeding

2. Generate constitution: Create T383838.specify/memory/constitution.md tailored to the project:

The constitution MUST include:
β€’ Project identity: Name, purpose, primary language(s), architecture pattern
β€’ Code boundaries: Which directories contain which types of code (e.g., "frontend code lives in T383838client/, backend in T383838server/")
β€’ Naming conventions: File naming, variable naming, branch naming as detected
β€’ Testing requirements: Test framework, test location, coverage expectations
β€’ Dependency rules: How modules depend on each other, what imports are allowed
β€’ Quality gates: Linting, formatting, CI checks that must pass

The constitution MUST NOT:
β€’ Override existing project standards without user confirmation
β€’ Invent conventions that don't exist in the codebase
β€’ Include generic boilerplate unrelated to the actual project

3. Customize spec template: Modify T383838.specify/templates/spec-template.md to reflect the project:
β€’ Add project-specific sections (e.g., "Database Migrations" for projects with ORMs)
β€’ Include architecture-aware requirements (e.g., "Frontend Requirements" and "API Requirements" for full-stack projects)
β€’ Reference actual module paths instead of generic placeholders

4. Customize plan template: Modify T383838.specify/templates/plan-template.md to reflect the project:
β€’ Include module-aware implementation sections (e.g., separate phases for frontend/backend)
β€’ Reference actual test frameworks and build tools
β€’ Include project-specific complexity factors

5. Customize tasks template: Modify T383838.specify/templates/tasks-template.md to reflect the project:
β€’ Task phases should map to the project's actual module structure
β€’ Include project-specific setup tasks (e.g., database migration, dependency install)
β€’ Reference actual test commands (e.g., T383838npm test, T383838pytest, T383838go test ./...)

6. Generate AGENTS.md (if multi-module): For monorepos and multi-module projects:
β€’ Define agent boundaries per module
β€’ Specify which agent owns which directories
β€’ Set up inter-agent communication rules

7. Present changes: Show the user what will be created or modified:

T282828
# Bootstrap Plan

| File | Action | Description |
|------|--------|-------------|
| Ta5d6ff`.specify/memory/constitution.md` | Create | Project-specific constitution with detected conventions |
| Ta5d6ff`.specify/templates/spec-template.md` | Modify | Add project-specific sections (Database Migrations, API Contract) |
| Ta5d6ff`.specify/templates/plan-template.md` | Modify | Add module-aware phases (frontend, backend, shared) |
| Ta5d6ff`.specify/templates/tasks-template.md` | Modify | Add actual test commands and build steps |
| Ta5d6ff`AGENTS.md` | Create | Agent boundaries for frontend and backend modules |

Proceed with bootstrap? (confirm before writing)


8. Execute bootstrap: After user confirmation, write all files.

9. Report:

T282828
# Bootstrap Complete

| Artifact | Status |
|----------|--------|
| Constitution | βœ… Created β€” 12 rules from detected conventions |
| Spec template | βœ… Customized β€” added Database Migrations, API Contract sections |
| Plan template | βœ… Customized β€” frontend/backend phase split |
| Tasks template | βœ… Customized β€” actual test commands included |
| AGENTS.md | βœ… Created β€” 2 agents (frontend, backend) |

## Next Steps
Tff7b72- Review Ta5d6ff`.specify/memory/constitution.md` and adjust any rules
Tff7b72- Run Ta5d6ff`/speckit.brownfield.validate` to verify configuration matches project
Tff7b72- Run Ta5d6ff`/speckit.brownfield.migrate` to reverse-engineer specs for existing features
Tff7b72- Start new features with Ta5d6ff`/speckit.specify` β€” templates are now project-aware


Rules

β€’ Always confirm before writing β€” show the bootstrap plan and wait for approval
β€’ Never overwrite without asking β€” if constitution or templates already exist, show a diff and ask
β€’ Derive from reality β€” every constitution rule must trace to something detected in the codebase
β€’ No invented conventions β€” if the project has no consistent pattern for something, say so instead of guessing
β€’ Respect existing spec-kit setup β€” if T383838.specify/ already has customizations, merge rather than replace
β€’ Module-aware β€” for monorepos, generate configuration that respects module boundaries

Served by rngit 1.5.2 - Generated in 0.07s